package com.sxz.sbs.module.client.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sxz.sbs.R;
import com.sxz.sbs.app.GlideApp;
import com.sxz.sbs.module.client.bean.AllHousesBean;
import java.util.List;

/**
 * 所有楼盘适配器
 */

public class AllHousesAdapter extends BaseQuickAdapter<AllHousesBean.HousesBean,BaseViewHolder>{

    public AllHousesAdapter(@Nullable List<AllHousesBean.HousesBean> data) {
        super(R.layout.item_allhouses,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, AllHousesBean.HousesBean item) {
        GlideApp.with(mContext).load(item.getPhotoUrl()).placeholder(R.drawable.img_default).into((ImageView) helper.getView(R.id.iv_all_houses));
        helper.setText(R.id.tv_houses_name,item.getName());
        helper.setText(R.id.tv_company_name,item.getDevelop());
        helper.setText(R.id.tv_house_address,item.getAddress());
    }
}
